Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron-26 (Auto Launch for Mac) #109

Merged
merged 4 commits into from
May 31, 2017
Merged

Conversation

KiranNiranjan
Copy link
Member

Updated AutoLauncher path to make it work properly in mac osx

@KiranNiranjan
Copy link
Member Author

@lneir & @VishwasShashidhar Please review. Thanks

js/main.js Outdated
@@ -46,7 +46,7 @@ if (shouldQuit) {

var symphonyAutoLauncher = new AutoLaunch({
name: 'Symphony',
path: process.execPath,
path: isMac ? '/Applications/' + app.getName() + '.app' : process.execPath,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are relying on app being installed is this exact location - which it will but in case it is put elsewhere - couldn't you instead use app.getPath('exe') and figure out from there?

Copy link
Member Author

@KiranNiranjan KiranNiranjan May 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By doing that i was facing this issue. Auto launcher verifies the path and if it fails to locate, it will defaults to the exe path.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about this..
var appPath = app.getPath('exe').split('.app/Content')[0] + '.app';
appLauncher = new AutoLaunch({
name: app.getName(),
path: appPath,
});

@KiranNiranjan KiranNiranjan changed the title Electron-19 (Auto Launch for Mac) Electron-26 (Auto Launch for Mac) May 29, 2017
@KiranNiranjan
Copy link
Member Author

@lneir Changed the implementation. Please review. Thanks.

electron.dialog.showErrorBox(title, title + ': ' + err);
});
if (isMac){
childProcess.exec(`launchctl load ${launchAgentPath}`, (err) => {
Copy link

@lneir lneir May 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we do different work to change how to enable/disable startup for mac? doesn't the auto-launch package work for mac? i thought it should take care of all of this???
https://www.npmjs.com/package/auto-launch

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As informed earlier in this ticket there are open issue for MacOS, we've built a custom solution. Please check the ticket here -> issue

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, then please add documentation here why we are using different soln (i.e., bug in electron and provide ref to bug - so we can track when it gets fixed).

@KiranNiranjan
Copy link
Member Author

KiranNiranjan commented May 31, 2017

Need to change this custom implementation to use AutoLaunch once this issue is fixed Teamwork/node-auto-launch#28

@lneir
Copy link

lneir commented May 31, 2017

lgtm

@lneir lneir merged commit 8e8b394 into finos:master May 31, 2017
@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
@KiranNiranjan KiranNiranjan deleted the ELECTRON-26 branch September 6, 2019 06:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants